% V20210224 - 13.7 Panel Transitions % Create transition array. ARRAY.LOAD transition$[], "push", "reveal", "overlay" % Load the library. INCLUDE "GW.bas" % Create a new page. p = GW_NEW_PAGE() % Prepare titlebar strings. title$ = GW_ADD_BAR_TITLE$("Panel transitions") GW_USE_THEME_CUSTO_ONCE("notext icon=power") btn$ = GW_ADD_BAR_RBUTTON$(">BACK") % Add the titlebar to the page. GW_ADD_TITLEBAR(p, title$ + btn$) % Create 3 panels, one per transition. DIM panel[3] FOR i = 1 TO 3 panel_content$ = "
Transition: " + transition$[i] + "
" panel[i] = GW_ADD_PANEL(p, panel_content$) GW_SET_TRANSITION(panel[i], transition$[i]) NEXT % Add a descriptive text. GW_ADD_TEXT(p, "Each panel has its own transition effect: push, reveal, and overlay.") % Create 3 buttons, 1 per panel. FOR i = 1 TO 3 GW_ADD_BUTTON(p, "Open panel #"+INT$(i), GW_SHOW_PANEL$(panel[i])) NEXT % Render page. GW_RENDER(p) % Handle user input. DO r$ = GW_WAIT_ACTION$() POPUP r$ UNTIL r$ = "BACK" END "End of Panel transitions example"